function [output] = ppm_mod_bin (size, input)
% Function for PPM Modulation.
% size: Size of PPM

len = length(input);
% No. of bits to be taken at a time for size-PPM
pic = log2(size);
% New Length of the PPM Modulated Signal
nlen = (size/pic)*len;

output = zeros(1, nlen);

for i=1:(len/pic)
    dec = bi2de(input((i-1)*pic+1: i*pic),pic,'left-msb');
    output((i-1)*size+dec+1)=1;
end


